fix(build): use tsx
for build scripts
#569
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I removed the
ts-node
dependency in #563, but forgot that we have a bunch of scripts that rely on being run with that package. 🤦Unfortunately, the move to ES Modules for various packages we rely on made it impossible to just revert the config.
I ran into some issues despite running with the
--esm
flag, and there seem to be some upstream issues withts-node
and Node 20: TypeStrong/ts-node#1997I tried
tsx
as a drop-in replacement and it seems to work like a charm.Note that this PR seems to have updated a bunch of docs via the
pre-build
script. I don't know why changes didn't pick this up before, but it seems like all these formatting changes the double whitespaces are present upstream. Might be related to the Remark-related package upgrades from the Docusaurus 3 upgrade.